package com.ms.education.statistics.controller;

import com.ms.education.statistics.handler.ElasticJobHandler;
import com.ms.education.statistics.jobs.StatisticDailyJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>Project:我的代码-JobManagerController
 * <p>Powered by ms on 2023-02-11 19:12:34
 *
 * @author ms
 * @version 1.0
 * @since 1.8
 */
@RestController
@RequestMapping("/statistics/job")
public class JobManagerController {

    @Autowired
    private ElasticJobHandler elasticJobHandler;

    @GetMapping("addSimple")
    public String add(){
        System.out.println("请求来啦==============");
        String cron="0/6 * * * * ?";
        //elasticJobHandler.addJob(new StatisticDailyJob(),"job1",cron,1,null,null,true,true,"添加了一个任务");
        return "OK";
    }
}
